package day10.tarena.com;

public class TestMethod {
		public static void main(String[] args) {
				String s1 = "abcdefg";
				System.out.println(s1.substring(2));
				System.out.println(s1);
				s1 = s1.substring(2);
				String s2 = "zhang,man,25";
				String[] ss =s2.split(",");
				for(int i=0; i<ss.length; i++){
						System.out.println(ss[i]);
				}
				String s3 = "abcdddabcdddabcdddabc";
				System.out.println(s3.indexOf("abc"));
				int index = 0;
				for( ; ;){             //循环次数不确定,用死循环,然后按条件break;
						index = s3.indexOf("abc", index);
						if(index == -1) break;          //它加到什么时候会成为－1？
						System.out.println(index);
						index++;
				}
	}

}
